import Vue from 'vue';
import App from './App.vue'
import "./style/global.less"
import router from './router/index.js'
import showMessage from "./utils/showMessage.js";
import "./eventBus";
import "./mock"
import store from "./store";
store.dispatch('setting/fetchsetting');


Vue.prototype.$showMessage = showMessage;
Vue.config.productionTip = false;
//自定义指令 
import vloading from "./directive/loading.js"
import vlazy from "./directive/lazy"
//全局注册自定义指令
Vue.directive('loading', vloading);
Vue.directive('lazy', vlazy);


new Vue({
        router,
        store,
        render: h => h(App),
    }).$mount('#app')
    // 测试
    // import * as messageApi from "./api/message"
    // // messageApi.getMessage('adsfadf').then(r => console.log(r));
    // messageApi.PostMessage({
    //     nickname: "昵称",
    //     content: "评论内容，纯文本",
    //     blogId: '123'
    // }).then(r => console.log(r));
    // messageApi.getMessage().then(r => console.log(r));
    // import { getSetting } from "./api/setting"
    // async function getside() {
    //     const resp = await getSetting();
    //     console.log(resp);
    // }getside()
    // import { getMessage } from './api/message';
    // import { postMessage } from './api/message';
    // async function text() {
    //     const resp = await getMessage(2,10);
    //     console.log(resp);
    // }
    // text();